"use strict";

Object.defineProperty(exports, "__esModule", {
    value: true
});
var promiseDelay = exports.promiseDelay = function promiseDelay() {
    var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000;
    var result = arguments[1];
    var isReject = arguments[2];

    return new Promise(function (resolve, reject) {
        setTimeout(function () {
            if (isReject) {
                reject(result);
                return;
            }
            resolve(result);
        }, time);
    });
};
exports.default = promiseDelay;